import type { ListResponseType, BaseListItemType } from '../global.type';

/**
 * 学期查询
 */
export interface GetTermListParamsType {
	id?: string;
	name?: string;
	codes?: string;
	year?: string;
	currentPage?: number;
	numPerPage?: number;
}

export type GetTermListResponseType = ListResponseType<BaseListItemType>;

export interface GetTerm4DayResponseType {
	beginDay: string;
	endDay: string;
	code: string;
	id: string;
	name: string;
	weekNum: number;
	year: string;
}

/**
 * 学院查询
 */
export interface GetOrganizationListParamsType {
	id?: string;
	code?: string;
	codes?: string;
	name?: string;
	type?: string;
	academyType?: number;
	parentCode?: string;
	currentPage?: number;
	numPerPage?: number;
}

export type GetOrganizationListResponseType = ListResponseType<BaseListItemType>;

/**
 * 校区查询
 */
export interface GetCampusListParamsType {
	id?: string;
	name?: string;
	campusCode?: string;
	currentPage?: number;
	numPerPage?: number;
}
export type GetCampusListResponseType = ListResponseType<BaseListItemType>;

/**
 * 教学楼查询
 */
export interface GetBuildingListParamsType {
	id?: string;
	campusCode?: string;
	code?: string;
	name?: string;
	currentPage?: number;
	numPerPage?: number;
}
export type GetBuildingListResponseType = ListResponseType<BaseListItemType>;

/**
 * 教室查询
 */
export interface GetRoomListParamsType {
	id?: string;
	code?: string;
	name?: string;
	roomTypeId?: string;
	buildingCode?: string;
	currentPage?: number;
	numPerPage?: number;
}
interface RoomListItemType extends BaseListItemType {
	campusCode: string;
	buildingCode: string;
	campusName: string;
	buildingName: string;
}
export type GetRoomListResponseType = ListResponseType<RoomListItemType>;

/**
 * 课堂信息
 */
export interface GetCourseListParamsType {
	codes?: string;
	courseCodes?: string;
	searchValue?: string;
}
export interface RoleListItemType {
	descs: string;
	id: string;
	identification: number;
	level: string;
	levelName: string;
	name: string;
}
export interface TeacherListItemType extends BaseListItemType {
	academyCode: string;
	academyName: string;
	id: string;
	inSchool: number;
	level: number;
	teacherCode: string;
	roleList: RoleListItemType[];
}
export interface CourseListItemType extends BaseListItemType {
	academyCode: string;
	academyName: string;
	aiStatus: number;
	beginOrder: number;
	beginTime: number;
	buildingCode: number;
	buildingFloorNo: number;
	buildingName: string;
	campusCode: string;
	courseCode: string;
	endOrder: number;
	endTime: number;
	id: string;
	liveStatus: number;
	planBeginTime: number;
	planEndTime: number;
	recordStatus: number;
	roomCode: string;
	roomName: string;
	roomType: string;
	status: number;
	subjectCode: string;
	subjectName: string;
	teacherCodes: string;
	teacherNames: string;
	teachingClassCode: string;
	teachingClassName: string;
	teachingClassStudentCount: number;
	termCode: string;
	termName: string;
	weekDay: number;
	teacherList: TeacherListItemType[];
}
export type GetCourseListResponseType = ListResponseType<CourseListItemType>;

// 作息时间
export interface GetTimeTableListParamsType {
	id?: number;
	seasonCode?: number;
	searchDay?: string;
}
export interface TimeTableListItemType {
	beginTime: string;
	classOrder: number;
	code: string;
	createTime: number;
	dailyRoutineId: string;
	dailyRoutineName: string;
	endTime: string;
	id: string;
	seasonCode: string;
	seasonName: string;
	updateTime: number;
}

export type GetTimeTableListResponseType = TimeTableListItemType[];

export interface CourseProjectPage4AICEListItemType {
	id: number;
	code: string;
	termCode: string;
	subjectCode: string;
	subjectName: string;
	academyCode: string;
	academyName: string;
	teacherCode: string;
	teacherName: string;
	teachingClassCode: string;
	teachingClassName: string;
	courseTypeCode: string;
	classCode: string | null;
	className: string | null;
	belongAcademyCode: string | null;
	belongAcademyName: string | null;
	updateTime: number;
	createTime: number;
	termName: string;
	lessonCount: number;
}
export type GetCourseProjectPage4AICEResponseType =
	ListResponseType<CourseProjectPage4AICEListItemType>;
